﻿using System;
using YunZuan.Models.Entities;
using YunZuan.Models.Attributes;

namespace YunZuan.Models
{
    [Table(TableName = "yz_Address", PrimaryKey = "AddressID")]
    public class AddressInfo : BaseEntity
    {
        #region Private Properties
        private int? _addressID;
        private string _consignee;
        private string _tel;
        private string _address;
        private string _area;
        private DateTime? _lastUseTime;
        private int? _customerID;
        private DateTime? _createTime;
        private short? _sysStatus;
        private short? _isDefault;

        #endregion

        #region Public Properties
        /// <summary>
        /// AddressID.
        /// </summary>
        [Column(IsAutoIncrement = true)]
        public int? AddressID
        {
            get
            {
                return _addressID;
            }
            set
            {
                this.ChangeNotify<int?>("AddressID", value, ref _addressID);
            }
        }

        /// <summary>
        /// Consignee.
        /// </summary>
        public string Consignee
        {
            get
            {
                return _consignee;
            }
            set
            {
                this.ChangeNotify<string>("Consignee", value, ref _consignee);
            }
        }

        /// <summary>
        /// Tel.
        /// </summary>
        public string Tel
        {
            get
            {
                return _tel;
            }
            set
            {
                this.ChangeNotify<string>("Tel", value, ref _tel);
            }
        }

        /// <summary>
        /// Address.
        /// </summary>
        public string Address
        {
            get
            {
                return _address;
            }
            set
            {
                this.ChangeNotify<string>("Address", value, ref _address);
            }
        }

        /// <summary>
        /// Area.
        /// </summary>
        public string Area
        {
            get
            {
                return _area;
            }
            set
            {
                this.ChangeNotify<string>("Area", value, ref _area);
            }
        }

        /// <summary>
        /// LastUseTime.
        /// </summary>
        public DateTime? LastUseTime
        {
            get
            {
                return _lastUseTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("LastUseTime", value, ref _lastUseTime);
            }
        }

        /// <summary>
        /// CustomerID.
        /// </summary>
        public int? CustomerID
        {
            get
            {
                return _customerID;
            }
            set
            {
                this.ChangeNotify<int?>("CustomerID", value, ref _customerID);
            }
        }

        /// <summary>
        /// CreateTime.
        /// </summary>
        public DateTime? CreateTime
        {
            get
            {
                return _createTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("CreateTime", value, ref _createTime);
            }
        }

        /// <summary>
        /// SysStatus.
        /// </summary>
        public short? SysStatus
        {
            get
            {
                return _sysStatus;
            }
            set
            {
                this.ChangeNotify<short?>("SysStatus", value, ref _sysStatus);
            }
        }

        /// <summary>
        /// IsDefault.
        /// </summary>
        public short? IsDefault
        {
            get
            {
                return _isDefault;
            }
            set
            {
                this.ChangeNotify<short?>("IsDefault", value, ref _isDefault);
            }
        }


        #endregion
    }
}
